package com.wuyou.designPatterns.chainofresponsibility;

/**
 * 解决指定编号的问题
 *
 * @Date 2024/10/12 15:22
 * @Author 无忧
 */
public class SpecialSupport extends Support{

    private int number;

    public SpecialSupport(String name, int number) {
        super(name);
        this.number = number;
    }

    @Override
    protected boolean resolve(Trouble trouble) {
        if(trouble.getNumber() == number){
            return true;
        }
        return false;
    }
}
